<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

/*
创建需要的迁移文件
php artisan make:migration create_house_table
*/




class CreateHouseTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('house', function (Blueprint $table) {
            $table->increments('id');
//            家庭成员的名字
            $table->string('member_name', 20);
//            家庭成员在家里的角色
            $table->string('member_role',20);
//            家庭成员的照片
            $table->string('member_images');
//            属于是哪一个账号的家庭
            $table->tinyInteger('pid');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('house');
    }
}
